package com.qf.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * 获取是否从Gitee dev配置文件
 * @author lixu
 */
@RestController
@RequestMapping("/config")
@RefreshScope//接收到RabbitMQ的消息之后 马上进行配置文件的更新  不停机维护
public class ConfigController {

    @Value("${version}")
    private String version;

    @GetMapping("/dev")
    public String dev(){
        return "我是配置客户端:gitee:" + version;
    }
}
